'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')

// https://blog.csdn.net/qq_20097569/article/details/82492819
// https://blog.csdn.net/gebitan505/article/details/58166055
let params = process.argv[4]
let baseUrl = ''
switch (params) {
  case '--env=test':
    baseUrl = '"http://localhost:8086"'
    break
  case '--env=prod':
    baseUrl = '"http://localhost:8086"'
    break
  default:
    baseUrl = '"http://localhost:8080"'
}
module.exports = merge(prodEnv, {
  NODE_ENV: '"development"',
  baseUrl: baseUrl
})
